SELECT
	st.text,
    qp.query_plan,
    qs.*
FROM (
    SELECT TOP 50 *
    FROM sys.dm_exec_query_stats
    ORDER BY total_worker_time DESC
) AS qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st
CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) AS qp
CROSS APPLY sys.dm_exec_plan_attributes(qs.plan_handle) AS pa
WHERE pa.attribute = 'set_options'
        AND (CAST(pa.value AS INT) & 131072 = 131072
             OR CAST(pa.value AS INT) & 4 = 4);